#!/bin/bash
N=4
NRun=10
NRun=1063
Mdir="/sps/isc/rneveu/"
BATCHdir="OutputCC/"
Separator="/"

S=799

while [ $S -lt $NRun ]
do
NomFichierSH="launch_File_${S}_Part_${N}.sh"
cat >$NomFichierSH <<EOF
#!/bin/bash
matlab R2016b -nodesktop -nojvm -nodisplay -nosplash -r "addpath('/sps/isc/rneveu/EtudeIRM/Nature');AnalyseNature(${S},${N});quit;"
EOF

qsub -P P_isc -e $Mdir$BATCHdir -o $Mdir$BATCHdir -l h_rss=6G -l h_fsize=6G -l h_cpu=01:45:00 -l matlab=1 -l sps=1 -N File_${S}_Part_${N} launch_File_${S}_Part_${N}.sh

let "S += 1"

done